package com.onehouse.domain.payment.model.valobj;

public enum PaymentMethod {
    CASH("现金"),
    ALIPAY("支付宝");

    private final String description;

    PaymentMethod(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public String getShortCode() {
        switch (this) {
            case CASH:
                return "xj";    //现金简写
            case ALIPAY:
                return "al";    //阿里简写
            default:
                throw new IllegalArgumentException("未知的支付方式: " + this);
        }
    }

}
